#include "TowerPanel.hpp"
#include "ResourceManager.hpp"


TowerPanel::TowerPanel(sf::RenderWindow* window)
    : ::Panel(window,
              sf::Vector2f(555, 50),
              sf::Vector2f(250, 100),
              ResourceManager<sf::Sprite>::instance()->get("TowerPanel_BG"))
{}

TowerPanel::~TowerPanel()
{}

void
TowerPanel::render()
{
    window_->draw(*background_);

    auto pellet = ResourceManager<sf::Sprite>::instance()->get("Pellet1");
    auto squirt = ResourceManager<sf::Sprite>::instance()->get("Squirt1");
    auto frost = ResourceManager<sf::Sprite>::instance()->get("Frost1");
    auto swarm = ResourceManager<sf::Sprite>::instance()->get("Swarm1");
    auto dart = ResourceManager<sf::Sprite>::instance()->get("Dart1");

    pellet->setPosition(position_.x + 37, position_.y + 10);
    window_->draw(*pellet);

    squirt->setPosition(position_.x + 75, position_.y + 55);
    window_->draw(*squirt);

    frost->setPosition(position_.x + 110, position_.y + 10);
    window_->draw(*frost);

    swarm->setPosition(position_.x + 145, position_.y + 55);
    window_->draw(*swarm);

    dart->setPosition(position_.x + 180, position_.y + 10);
    window_->draw(*dart);
}

void
TowerPanel::handleEvents(const sf::Event& )
{}
